﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SupportManagers.ascx.cs" Inherits="NCS.Module.LinkSite.Admin.SupportManagers" %>
 <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
    <asp:UpdatePanel ID="updatepanel" runat="server">
    <ContentTemplate>
    
<script type="text/javascript">

function valideForm(){
    var nick = document.getElementById('<% = this.txtName.ClientID %>').value;
    nick = nick.replace(/^\s+|\s+|\s+$/g, '');
    if(nick.length == 0){
        alert('Bạn cần nhập tên nick');
        return false;
    }
    
    var type = document.getElementById('<% = this.DrdGroup.ClientID %>').selectedIndex;
    if(type == 0)
    {
        alert('Bạn cần chọn kiểu nick');
        return false;
    }
    
    return true;
}

</script>

<asp:Label ID="lblUpdateStatus" runat="server"></asp:Label>
<table border="0" cellpadding="0" cellspacing="0" width="700">
    <tr>
	    <td width="15%"><b>Tên nick</b></td>
	    <td>
		    <asp:TextBox Width="40%" runat="server" ID="txtName"></asp:TextBox>            
		    <asp:HiddenField runat ="server" ID = "hiddenid" Visible = "false"/>
		</td>
    </tr>
    <tr>
        <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
	    <td style="height: 22px">
		    <b>Nhóm</b></td>
	    <td style="height: 22px">
            <asp:DropDownList ID="DrdGroup" runat="server">
                <asp:ListItem Value ="0" >--- Chọn kiểu nick ----</asp:ListItem>
                <asp:ListItem Value="1">Nick Yahoo</asp:ListItem>
                <asp:ListItem Value="2">Nick Skype</asp:ListItem>
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
	    <td>
		    <b>Mô tả</b></td>
	    <td>
		    <asp:TextBox Width="60%" TextMode="MultiLine" runat="server" ID="txtDescription"></asp:TextBox></td>
    </tr>
    <tr>
        <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
        <td>
            Trạng Thái</td>
        <td>
            <asp:CheckBox ID="chkActive" runat="server" Text="Cho phép hiển thị" /></td>
    </tr>
    <tr>
        <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
        <td align="center" class="TextBox_Input" colspan="2">
                <asp:Button ID="btnAddNew" runat="server" CssClass="Button" OnClick="btnAddNew_Click"
                    OnClientClick="return valideForm();" Text="Thêm" Width="62px" />
                <asp:Button ID="btnEdit" runat="server" CssClass="Button" OnClick="btnEdit_Click"
                    OnClientClick="return valideForm();" Text="Sửa " Width="62px" /></td>
    </tr>
     <tr>
        <td height="10" colspan="2">
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <asp:GridView OnRowDataBound="grvEmployment_RowDataBound" ID="grvEmployment" runat="server"
            AllowPaging="True" AutoGenerateColumns="false" Width="100%" PageSize="20" CellPadding="4"
            ForeColor="#333333" GridLines="None" OnRowCommand="grvEmployment_RowCommand" OnRowDeleting="grvEmployment_RowDeleting" OnRowEditing="grvEmployment_RowEditing">
            <PagerSettings PageButtonCount="20" Position="TopAndBottom" />
            <Columns>
                <asp:TemplateField HeaderText="&#160;&#160;&#160;STT">
                    <ItemTemplate>
                        &nbsp;&nbsp;&nbsp;<asp:Label ID="lblSTT" runat="server" Font-Bold="true"></asp:Label>
                    </ItemTemplate>
                    <ItemStyle Height="25px" HorizontalAlign="Left" VerticalAlign="Middle" Width="10%" />
                    <HeaderStyle Height="30px" HorizontalAlign="Left" VerticalAlign="Middle" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="&#160;&#160;&#160;Name">
                    <ItemTemplate>
                        &nbsp;&nbsp;&nbsp;<asp:Label ID="lblName" runat="server" Font-Bold="true"></asp:Label>
                    </ItemTemplate>
                    <ItemStyle Height="25px" HorizontalAlign="Left" VerticalAlign="Middle" Width="35%" />
                    <HeaderStyle Height="30px" HorizontalAlign="Left" VerticalAlign="Middle" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText = "Kiểu hỗ trợ">
                    <ItemTemplate>
                        <asp:Label runat = "server" ID ="lbType"></asp:Label>
                    </ItemTemplate>
                    <ItemStyle  Height="25px" HorizontalAlign="Left" VerticalAlign="Middle" Width="15%" />
                    <HeaderStyle Height="30px" HorizontalAlign="Left" VerticalAlign="Middle"/>
                </asp:TemplateField>
                <asp:TemplateField HeaderText ="Trạng thái">
                    <ItemTemplate>
                        <asp:Label runat ="server" ID ="lbStatus"></asp:Label>
                    </ItemTemplate>
                    <ItemStyle Height="25px" HorizontalAlign="Left" VerticalAlign="Middle" Width="25%"/>
                    <HeaderStyle Height="30px" HorizontalAlign="Left" VerticalAlign="Middle"/>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="&#160;&#160;&#160;Thao t&#225;c">
                    <ItemTemplate>
                        <asp:ImageButton ID="btnEdit" ImageUrl="/Administrator/Images/GridView/edit.gif"
                            runat="server" CommandArgument='<%# Eval("ID") %>' CommandName="edit" ToolTip="Sửa" />
                        &nbsp;
                        <asp:ImageButton ID="btnDelete" ImageUrl="/Administrator/Images/GridView/delete.gif"
                            runat="server" CommandArgument='<%# Eval("ID") %>' CommandName="delete" ToolTip="Xóa" />
                    </ItemTemplate>
                    <ItemStyle Height="25px" HorizontalAlign="Left" VerticalAlign="Middle" Width="15%" />
                    <HeaderStyle Height="30px" HorizontalAlign="Left" VerticalAlign="Middle" />
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <EditRowStyle BackColor="#999999" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        </asp:GridView>
        </td>
    </tr>  
    
</table>
</ContentTemplate>
    </asp:UpdatePanel>